package com.example.springbootelasticjob.job;

import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.dataflow.DataflowJob;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import com.example.autoconfig.ElasticDataflowJob;
import com.example.autoconfig.ElasticSimpleJob;
import com.example.springbootelasticjob.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @ClassName ThirdOrderProduceJob
 * @Description TODO
 * @Author wyp
 * @Date 2023/8/17 10:33
 * @Version 1.0
 */
//@ElasticSimpleJob(
//        jobName = "thirdOrderProduceJob",
//        cron = "0/5 * * * * ?",
//        shardingTotalCount = 1,
//        overwrite = true
//)

public class ThirdOrderProduceJob implements SimpleJob {
    @Autowired
    private OrderService orderService;

    @Override
    public void execute(ShardingContext shardingContext) {
        orderService.produceThirdOrder();
    }
}
